//
//  BVPopoverDateView.m
//  BVHomeScene
//
//  Created by 崔晋 on 2019/10/28.
//

#import "BVPopoverDateView.h"


@interface BVPopoverDateView ()

@property (nonatomic, strong)  WZYCalendarView *calendarView;

@end

@implementation BVPopoverDateView

- (void)setupViews {
    [super setupViews];
    [self.contentView addSubview:self.calendarView];
    
}



- (WZYCalendarView *)calendarView {
    if (!_calendarView) {
        _calendarView = [[WZYCalendarView alloc] initWithFrameOrigin:CGPointMake(0, 0) width:self.contentView.width];
        __weak typeof(self)weakSelf = self;
        [_calendarView setDidSelectDayHandler:^(NSInteger year, NSInteger month, NSInteger day) {
            if (weakSelf.selectDay) {
                weakSelf.selectDay(year, month, day);
            }
        }];
    }
    return _calendarView;
}

@end
